<template>
  <div class="home">
    <el-table
            :data="datalist"
            stripe
            style="width: 100%">
      <el-table-column
              prop="CouName"
              label="课程名"
              width="180">
      </el-table-column>
      <el-table-column
              prop="Kind"
              width="150"
              label="课程分类">
      </el-table-column>
      <el-table-column
              prop="Teacher"
              label="任课教师"
              width="180">
      </el-table-column>
      <el-table-column
              prop="DepartNo"
              label="日期"
              width="180">
      </el-table-column>
      <el-table-column
              prop="SchoolTime"
              label="日期"
              width="180">
      </el-table-column>
      <el-table-column
              prop="LimitNum"
              label="限制人数"
              width="180">
      </el-table-column>
      <el-table-column
              prop="WillNum"
              label="日期"
              width="180">
      </el-table-column>
      <el-table-column
              prop="ChooseNum"
              label="选择人数"
              width="180">
      </el-table-column>

    </el-table>
  </div>
</template>

<script>
const axios = require('axios');
export default {
  name: 'Home',
  data() {
    return {
      tableData:'',
      datalist:''
    }
  },created() {
    this.getlist()

  },methods:{
    getlist(){
      axios.get('http://localhost/Datasource.php')
              .then((res) => {
                this.datalist = res.data.data
              })
              .catch((err) => {
                console.log(err)
                alert("failes")
              })
    }
  }
}
</script>
